Software applications are gradually becoming more and more complex and powerful. What was once a simple text editor may now be a complex word processor with countless rich features, for example the ability to create Web pages or edit XML markup. As technology evolves, each software application provides more and more functionality to enhance a user's experience. In addition, many software applications now expose their native functionality to add-on applications through programmatic interfaces. For example, object oriented programming has enabled some software applications and their documents to be treated as objects. These objects publicly expose the functionality of the applications in the form of methods that may be called and properties that may be read or set to manipulate the applications or documents. These advancements have enabled programmers to develop third-party add-ons to automate tasks and functions formerly performed manually while interacting with the application. Many such add-on applications are developed in simple programming languages, such as the Visual Basic for Applications (VBA) language. These add-ons can work by calling the application's methods and properties to achieve various goals and customize the application's core functionality for a custom environment.
In addition to being able to make calls from the custom code of the add-on to the core application, there is need for the custom code to be written in such a way that it actually responds to (as opposed to “initiates”) calls from the application when something happens in the application itself. For example, one could want to write custom code for a word processing application, that reacts in some special way to the user's keystrokes received by the application and perhaps blocks some of them if the user is editing an area where only some types of letters are allowed. In such cases, there is need for a way for the programmer to let the application know that there is special custom code that the application should run when a given type of event occurs. Once the custom code is registered with the application, the code can now “react” in useful ways to specific events occurring within the core application, thereby extending the application's core functionality.